import java.util.Scanner;

public class FibonacciSequenceRecursive {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        System.out.println("请输入位数：");
        int n = scan.nextInt();
        System.out.println(fibonacciSequence(n));
    }

    public static int fibonacciSequence(int n) {
        if (n == 1 || n == 2) {
            return 1;
        } else {
            return fibonacciSequence(n - 1) + fibonacciSequence(n - 2);
        }
    }
}


